
package com.bstek.urule.console.servlet.diagram;

import org.codehaus.jackson.annotate.JsonIgnore;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Jacky.gao
 * @since 2015年1月6日
 */
public class NodeInfo {
    private int id;
    @JsonIgnore
    private int level;
    private String label;
    private String title;
    private String color;
    private int x;
    private int y;
    private int width;
    private int height;
    private int roundCorner;
    private List<NodeInfo> children;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getRoundCorner() {
        return roundCorner;
    }

    public void setRoundCorner(int roundCorner) {
        this.roundCorner = roundCorner;
    }

    public List<NodeInfo> getChildren() {
        return children;
    }

    public void addChild(NodeInfo nodeInfo) {
        if (children == null) {
            children = new ArrayList<NodeInfo>();
        }
        children.add(nodeInfo);
    }
}
